import request from '@/utils/request'

// 查询合同阶段列表
export function listStep(query) {
  return request({
    url: '/custom/step/list',
    method: 'get',
    params: query
  })
}
export function listPreview(id) {
  return request({
    url: '/custom/step/preview/' + id,
    responseType:'blob',
    method: 'get',
  })
}



export function imagePreview(id) {
  return request({
    url: '/system/detail/loadImage/' + id,
    responseType:'blob',
    method: 'get',
  })
}


// 查询合同阶段详细
export function getStep(id) {
  return request({
    url: '/custom/step/' + id,
    method: 'get'
  })
}

// 新增合同阶段
export function addStep(data) {
  return request({
    url: '/custom/step',
    method: 'post',
    data: data
  })
}

// 修改合同阶段
export function updateStep(data) {
  return request({
    url: '/custom/step',
    method: 'put',
    data: data
  })
}

// 删除合同阶段
export function delStep(id) {
  return request({
    url: '/custom/step/' + id,
    method: 'delete'
  })
}
